layui.use(['form','element','layer','jquery'],function(){
    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        element = layui.element;
        $ = layui.jquery;
    $(function(){
        console.log("12345678");
        $.ajax({
            url:'/index/indexData',
            type:'get',
            success:function(json){
             var data = json.data;
             $('.dataConten').empty();
             var html = '';
             for(var i = 0;i < data.length;i++){
                var item = data[i];
                html += '<a href="#" class="list-item">'+
                                 '<div class="imgLeft">'+
                                   '<span>'+
                                    ' <img src="/images/good_default.jpg" style="width: 100%;height:100%">'+
                                   '</span>'+
                                 '</div>'+
                                 '<div class="dataRight">'+
                                   '<div class="title clear">'+
                                     '<h3 class="ellipsis">'+item.name+'</h3>'+
                                     '<span class="app-try">虚拟</span>'+
                                   '</div>'+
                                   '<div class="score-show2">'+
                                     '<span class="gold">'+item.persent+'%</span>'+
                                   '</div>'+
                                   '<p class="introduce">'+item.remark+'</p>'+
                                 '</div>'+
                                 '<div class="list-bottom clear">'+
                                   '<label>'+item.scale+'天</label>'+
                                  '<label>七日年化</label>'+
                                   '<p class="view-count">'+
                                   '  <label></label> '+item.count+
                                 '  </p>'+
                               '  </div>'+
                               '</a>';
             }
             console.log(html);
             $('.dataConten').append(html);
            }
        });
    });

})
